const modalChildBehavior = require('../../behaviors/modalChildBehavior');
Component({
  properties: {
    num: {
      type: null,
      value: 0
    },
    active: {
      type: Boolean,
      value: false
    },
    close: {
      type: Boolean,
      value: false
    },
    open: {
      type: Boolean,
      value: true
    },
    error: {
      type: Boolean,
      value: false
      // observer: '_errorObserver'
    }
  },
  behaviors: [ modalChildBehavior ],
  methods: {
    _errorObserver( val ) {
      let self = this;
      if ( val ) {
        setTimeout(() => {
          self.setData({
            error: false
          })
        }, 200);
      }
    }
  }
})